package health

import (
	"gitcode.com/G-YT/ANN/server/api/v1"
	"gitcode.com/G-YT/ANN/server/middleware"
	"github.com/gin-gonic/gin"
)

type DiseaseRouter struct {
}

// InitDiseaseRouter 初始化 Disease 路由信息
func (s *DiseaseRouter) InitDiseaseRouter(Router *gin.RouterGroup, publicGroup *gin.RouterGroup) {
	diseaseRouter := Router.Group("disease").Use(middleware.OperationRecord())
	//diseaseRouterWithoutRecord := Router.Group("disease")
	pubRouter := publicGroup.Group("disease")
	var diseaseApi = v1.ApiGroupApp.HealthApiGroup.DiseaseApi
	{
		diseaseRouter.POST("createDisease", diseaseApi.CreateDisease)             // 新建Disease
		diseaseRouter.DELETE("deleteDisease", diseaseApi.DeleteDisease)           // 删除Disease
		diseaseRouter.DELETE("deleteDiseaseByIds", diseaseApi.DeleteDiseaseByIds) // 批量删除Disease
		diseaseRouter.PUT("updateDisease", diseaseApi.UpdateDisease)              // 更新Disease
		diseaseRouter.POST("setDiseaseGraphic", diseaseApi.SetDiseaseGraphic)     // 设置病症文章关系
		diseaseRouter.GET("getDiseaseGraphic", diseaseApi.GetDiseaseGraphic)      // 获取病症文章关系
	}
	{
		pubRouter.GET("findDisease", diseaseApi.FindDisease)       // 根据ID获取Disease
		pubRouter.GET("getDiseaseList", diseaseApi.GetDiseaseList) // 获取Disease列表
	}
}
